# ##########################################
SET( INCLUDE_FILES
	Include/spine/spine-sfml.h
)


# ##########################################
SET( SOURCE_FILES
	Source/main.cpp
	Source/spine/spine-sfml.cpp
	Source/spine/Animation.c
	Source/spine/AnimationState.c
	Source/spine/AnimationStateData.c
	Source/spine/Atlas.c
	Source/spine/AtlasAttachmentLoader.c
	Source/spine/Attachment.c
	Source/spine/AttachmentLoader.c
	Source/spine/Bone.c
	Source/spine/BoneData.c
	Source/spine/extension.c
	Source/spine/Json.c
	Source/spine/RegionAttachment.c
	Source/spine/Skeleton.c
	Source/spine/SkeletonData.c
	Source/spine/SkeletonJson.c
	Source/spine/Skin.c
	Source/spine/Slot.c
	Source/spine/SlotData.c
)


# ##########################################
# Let's make things pretty in IDE's.
SOURCE_GROUP( "Includes" FILES ${INCLUDE_FILES} )
SOURCE_GROUP( "Source" FILES ${SOURCE_FILES} )


# ##########################################
FIND_PACKAGE( OpenGL REQUIRED )


# ##########################################
IF( WIN32 )
	SET( EXETYPE WIN32 )
ENDIF()


# ##########################################

ADD_EXECUTABLE( TestSpine ${EXETYPE}
	${INCLUDE_FILES}
	${SOURCE_FILES}
)
TARGET_INCLUDE_DIRECTORIES( TestSpine PUBLIC ${CMAKE_CURRENT_LIST_DIR}/Include )
TARGET_LINK_LIBRARIES( TestSpine
	$<$<BOOL:${WIN32}>:sfml-main>
	sfml-window
	sfml-system
	sfml-graphics
	sfml-audio
	${OPENGL_LIBRARIES}
	${CMAKE_THREAD_LIBS_INIT}
)


# ##########################################
# Group the applications.
SET_PROPERTY( TARGET TestSpine PROPERTY FOLDER Applications/Testbeds )
